/*
 * @Author       : NaN 353362604@qq.com
 * @Date         : 2023-02-19 11:14:47
 * @LastEditTime : 2023-03-01 17:19:22
 * @LastEditors  : NaN 353362604@qq.com
 * @FilePath     : \AdminStration\src\Common\Modal\ThrModalList\CameraGroupDetail.jsx
 * @Description  :
 */
import { API_LIST } from '../../Api/Api'
import { setSelectSort } from '../../Router/MenuBoxList'
import { commonTableList } from '../config'

export const CameraGroupDetail = async ({ data, ClientData }) => {
    let dataList = {
        uuid: data.uuid,
        type: '新增摄像头',
        width: 800,
        classification: 'SelectModal',
        isCheckbox: true,
        pageSize: 10,
        params: { pageIndex: 1 },
        get: API_LIST()['getCamera'],
        pos: 'posCameraGroupDetail',
        assemblyData: e => {
            let list = []
            e.forEach(item => (list = [...list, { cameraUuid: item.uuid }]))
            return list
        },
        columns: [
            {
                title: '摄像头编号',
                dataIndex: 'Uuid',
                search: false,
                type: 'hidden',
                hideInTable: true,
            },
            {
                dataIndex: 'tableName',
                title: '名称',
                valueType: 'input',
                width: 200,
            },
            { ...commonTableList.organizationUuid, valueEnum: ClientData.organization, width: 300 },

            {
                dataIndex: 'cameraPositionName',
                title: '位置',
                valueType: 'input',
                width: 200,
            },
            {
                dataIndex: 'cameraTypeName',
                title: '类型',
                valueType: 'input',
                width: 200,
            },
        ],
    }

    return dataList
}
